package moh.s2.s2service.impl;

import static org.junit.Assert.fail;

import java.util.List;

import moh.s2.s2entity.AppSettingVO;
import moh.s2.s2service.AsService;

import org.junit.Test;
import org.springframework.context.ApplicationContext;
import org.springframework.context.support.ClassPathXmlApplicationContext;

public class AsServiceImplTest {

	@Test
	public void testGetAppSettings() {
		
		ApplicationContext ctx = new ClassPathXmlApplicationContext("appsetting-service.xml");
	
		AsService asserv = (AsService)ctx.getBean("asService");
		List<AppSettingVO> lst = asserv.getAppSettings();
		for(AppSettingVO v:lst) {
			System.out.println(v);
		}
		
		
	}
	
	@Test
	public void testGet() {
		ApplicationContext ctx = new ClassPathXmlApplicationContext("appsetting-service.xml");
		
		AsService asserv = (AsService)ctx.getBean("asService");
		System.out.println("\ntestGet");
		AppSettingVO v = asserv.get(1);
		System.out.println("AppSetting id=1:  "+ v);
	}


}
